import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'

const app = createApp(App)

app.use(router)
app.use(createPinia())
app.use(ElementPlus)

// 全局错误处理
app.config.errorHandler = (err) => {
    console.error('[Global Error]', err)
    // ElMessage.error('应用发生异常，请刷新页面')
}

app.mount('#app')